<template>
  <div class='student'>
    <Search btns="1-1-1" :searchData="searchData" :search="search"></Search>
    <Table btns="1-1-2" :tableData="tableData" :tableTotable="false" :data0="data" :params="pageInfo" :search="search" :pageSize="15" :url="url"></Table>
    <p style="display:none">{{getData}}</p>
  </div>
</template>
<script>
import Search from "../../common/search"
import Table from "../../common/table"
import MixIn from '../common/mixin.js'
export default {
  components: {Search,Table},
  name: "",
  data() {
    return {
      url:"",
      pageInfo:{
        page:1,
        total:0,
      },
      tableData:[
        {type:"index",name:"序号"},
        {prop:"year",name:"年份",width:""},
        {prop:"add",name:"填报人",width:""},
        {prop:"title",name:"论文题目",width:""},
        {prop:"author",name:"第一作者",width:""},
        {prop:"name",name:"刊物名称",width:""},
        {prop:"version",name:"标准刊号",width:""},
        {prop:"category",name:"刊物类别",width:""},
        {prop:"author_2",name:"第二作者",width:""},
        {prop:"author_3",name:"第三作者",width:""},
        {prop:"search",name:"三大检索类别",width:""},
        {prop:"",name:"操作",width:"",},
      ],
      // 列表数据
      data:[{}],
      settime:null
    };
  },
  computed:{
    getData(){
      if(this.settime)clearTimeout(this.settime)
      var params={...this.search,...{page:this.pageInfo.page}}
      this.settime=setTimeout(()=>{
        this.getList(params)
        return true
      },500)
    },
  },
  methods: {
    getList(params){
      var goal=params||{...this.search,...this.pageInfo}
      _g.apiPost("teacher/academic",goal,true).then(res=>{
        this.$set(this,"data",res.data.list)
        this.pageInfo.total=res.data.total
      })
    },
  },
  created() {},
  mixins:[MixIn],
};
</script>
<style scoped>
.student{
  background-color: #fff;
}
</style>